package cn.diancan.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Version;

import cn.diancan.util.DateUtil;


@Entity
public class Shop {
    
    private Long id; //当前版本跟  User.id 一致
    private String shopName;
    private String shopAddress;
    private String shopPhone;
    private String createTime;
    
    private Integer isDelete;
    private Integer version;
    
    @Version
    @Column(name="OPTLOCK",columnDefinition="int(11) DEFAULT 0")
    public Integer getVersion() {
        return version;
    }
    public void setVersion(Integer version) {
        this.version = version;
    }
    
    @Id 
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public String getShopName() {
        return shopName;
    }
    public void setShopName(String shopName) {
        this.shopName = shopName;
    }
    public String getShopAddress() {
        return shopAddress;
    }
    public void setShopAddress(String shopAddress) {
        this.shopAddress = shopAddress;
    }
    
    public String getShopPhone() {
        return shopPhone;
    }
    public void setShopPhone(String shopPhone) {
        this.shopPhone = shopPhone;
    }
    @Column(name="createTime",columnDefinition="DATETIME")
    public String getCreateTime() {
	return DateUtil.getMysqlDateTime(createTime);
    }
    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }
    
    public Integer getIsDelete() {
        return isDelete;
    }
    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }
 
    
    
    
    
    
    

}
